Schedule synchronous function to separate thread#312
Conversation
|
Ideally this is merged after: So I can solve the merge conflict and add necessary changes. |
|
About 561c22c, please see: QubesOS/qubes-core-admin-client#469 (comment) |
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026060617-devel&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026050504-devel&flavor=update
Failed tests22 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/176874#dependencies 22 fixed
Unstable testsDetails
Performance TestsPerformance degradation:20 performance degradations
Remaining performance tests:91 tests
|
17ed68f to
7482948
Compare
|
I tests this PR with a qube that can shutdown normally and a freezed qube. Sometimes I set those qube to shutdown to have dependencies, so it fail with "in use" if not using force. Tested system:
Tested actions:
|
Waiting for the server to send the result of the API calls, allows dealing with failures/exceptions: - QubesVM.shutdown -> .shutdown(wait=True) - QubesVM.run_service -> .run_service_for_stdio It also does not block the widget from being opened again even if an action is still running. This allows, for example: - To create disposable qube and attach device to it (which takes 10s), but not block the widget from opening - To detach and shutdown disposable that is hanging, without hanging the widget For: QubesOS/qubes-issues#10648 For: QubesOS/qubes-issues#10651 For: QubesOS/qubes-issues#10835 Requires: QubesOS/qubes-core-admin#807 Requires: QubesOS/qubes-core-admin-client#469
Co-authored-by: Ben Grande <ben@invisiblethingslab.com> Fixes: QubesOS/qubes-issues#10651 Fixes: QubesOS/qubes-issues#10835
Allows the widget to be destroyed before the action completes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #312 +/- ##
==========================================
- Coverage 92.72% 92.63% -0.10%
==========================================
Files 66 66
Lines 13618 13587 -31
==========================================
- Hits 12627 12586 -41
- Misses 991 1001 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Waiting for the server to send the result of the API calls, allows dealing with failures/exceptions:
It also does not block the widget from being opened again even if an action is still running. This allows, for example:
For qui/tray/domains.py, the "widget.destroy()" is called earlier, cause it's not needed after the response is received. Else it hangs until the "react_to_question" finishes.
For: QubesOS/qubes-issues#10648
For: QubesOS/qubes-issues#10651
For: QubesOS/qubes-issues#10835
Requires: QubesOS/qubes-core-admin#807
Requires: QubesOS/qubes-core-admin-client#469